home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / sort2.zip / README.DEV < prev    next >
Text File  |  1993-01-04  |  4KB  |  109 lines

  1.                        SORT by J. W. Rider
  2.  
  3. The SORT program is copyrighted by the author.  A general license
  4. is granted to execute the SORT program for any personal or
  5. business use.  A restricted license is granted to distribute
  6. either the user's version or the developer's version of SORT.
  7. These restrictions are:
  8.  
  9. 1) only ordinary copying and/or connect time fees can be charged
  10. for distribution of the SORT program and files,
  11.  
  12. 2) copyright notices must remain intact in the distribution of
  13. the SORT source code,
  14.  
  15. 3) my copyright notice must be embedded in modified executables.
  16. If any other copyright notice is displayed, my copyright notice
  17. must also be displayed.
  18.  
  19.  
  20. In short, you are free to do with this program whatever you want
  21. as long as you don't try to pass it off as your own -- or as
  22. public domain -- and as long as you don't make any money off
  23. of it that would ordinarily be subject to royalty payments.
  24.  
  25.  
  26. Files included in the developer's version of SORT:
  27.  
  28. ANSTR.FUN       -- included function for stripping
  29.                         non-alphanumeric characters
  30.  
  31. BTSORT.INC      -- included procedures for manipulating the
  32.                         binary tree
  33.  
  34. BVAL.FUN        -- included function for forcing a numeric value
  35.                         from a string.
  36.  
  37. ERREXIT.INC     -- included error exit procedure
  38.  
  39. FINDFLD.FUN     -- included function to find variable length
  40.                         fields in a line of text
  41.  
  42. HEAPMEM.FUN     -- included heap management functions
  43.  
  44. ISATTY.FUN      -- included function to determine source of
  45.                         standard input
  46.  
  47. ISWILD.FUN      -- included function to determine ambiguity in
  48.                         file specifications
  49.  
  50. LCASE.FUN       -- included function to convert a string to all
  51.                         lower case characters
  52.  
  53. REV.PAS         -- short program to reverse the ordering of text
  54.                         lines
  55.  
  56. SORT.MAN        -- description of SORT syntax and usage
  57.  
  58. SORT.PAS        -- SORT program main
  59.  
  60. SORT.TYP        -- included type declarations
  61.  
  62. SORT.VAR        -- included global variable declarations and
  63.                         initializations
  64.  
  65. SORTARGS.INC    -- included procedure to parse option switches on
  66.                         command line
  67.  
  68. SORTHLP.FUN     -- included function to display help message
  69.  
  70. STDINHDR.INC    -- included procedure to prompt user for input
  71.  
  72. WORDS.PAS       -- short program to generate a listing of "words"
  73.                         from standard input
  74.  
  75.  
  76. The user's version contains the following information in lieu of
  77. manual pages for REV and WORDS:
  78.  
  79. REV -- reads from standard output, writes to standard input.
  80. Completely reverses all lines read:  "abcde" becomes "edcba".
  81.  
  82. WORDS -- generates a list of "words", one word per line, from
  83. standard input, to standard output.
  84.  
  85. Let's say, hypothetically, that what you wanted to do was to get
  86. a list of all words in a file (FILE1) sorted by the last letter
  87. in the word (reverse dictionary order).  Put the results in file
  88. SUFFIX.
  89.  
  90.         C> words <file1 | rev | sort -c -u | rev >suffix
  91.  
  92. The "-c" option for SORT causes differences between upper and
  93. lower case to be ignored.  The "-u" option suppresses multiple
  94. instances for identical words.
  95.  
  96. If all you wanted to do is to generate a listing of unique words
  97. without regard to case (for running through a spell-checker for
  98. instance), try this:
  99.  
  100.       C> words <file1 | sort -c -u -k | sort -u | >wordlist
  101.  
  102. The "-k" option causes SORT to write each word out as it was used
  103. for sorting -- in this case, in lowercase.  The second stage
  104. removes duplicate keys.
  105.  
  106.  
  107. J. W. Rider
  108. [72426,1640]
  109.